package cn.jinjimi.app.plugin;

import cn.jinjimi.framework.plugin.PluginManager;

/**
 * Created by Hiro on 15/6/3.
 */
public class SimplePluginManager extends PluginManager {

    private static volatile PluginManager mPluginManager = null;

    public static PluginManager getInstance() {
        if (mPluginManager == null) {
            synchronized (PluginManager.class) {
                if (mPluginManager == null) {
                    mPluginManager = new SimplePluginManager();
                }
            }
        }
        return mPluginManager;
    }

    public SimplePluginManager() {
        super();

        //注册默认插件启动器
        addLauncher(WebPlugin.class, new WebPluginLauncher());
        addLauncher(NativePlugin.class, new NativePluginLauncher());
    }
}
